package com.jl.jlapp.adapter;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jl.jlapp.R;
import com.jl.jlapp.eneity.ClassificationModel.ResultDataBean;
import com.jl.jlapp.mvp.fragment.ClassifityFragment;

import java.util.List;

public class CliassifyAdapter
  extends BaseQuickAdapter<ResultDataBean, BaseViewHolder>
{
  public CliassifyAdapter(@LayoutRes int paramInt, @Nullable List<ResultDataBean> paramList)
  {
    super(paramInt, paramList);
  }
  
  protected void convert(BaseViewHolder paramBaseViewHolder, ResultDataBean paramResultDataBean)
  {
    paramBaseViewHolder.setText(R.id.tv_clissify_type, paramResultDataBean.getName());
    TextView tvType = (TextView)paramBaseViewHolder.getView(R.id.tv_clissify_type);
    if (ClassifityFragment.index == paramBaseViewHolder.getAdapterPosition())
    {
      tvType.setTextColor(paramBaseViewHolder.itemView.getContext().getResources().getColor(R.color.checkGreenColor));
      tvType.setBackgroundResource(R.color.ashenBackgroundColor);
      return;
    }
    tvType.setTextColor(paramBaseViewHolder.itemView.getContext().getResources().getColor(R.color.trans_333333));
    tvType.setBackgroundResource(R.color.white);
  }
}


/* Location:              /Users/davidzhang/Documents/decompileApk/jlfood-dex2jar.jar!/com/jl/jlapp/adapter/CliassifyAdapter.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */